package autokeyboard.handler;

import javax.swing.JTextArea;

import autokeyboard.data.DataAccess;

public class HelpDialogEvent
{
	private DataAccess da = new DataAccess();
	private int language = 0;
	
	/**
	 * This method will read SoftIntro.txt file and set all document from that file to your input textArea
	 * @param textArea
	 */
	public void showGameIntro(JTextArea textArea)
	{
		switch (language)
		{
			case 0:{textArea.setText(da.readFile(getClass().getResourceAsStream("/Data/SoftIntro.txt")));}break;
			case 1:{textArea.setText(da.readFileUTF8(getClass().getResourceAsStream("/Data/SoftIntro_VI.txt")));}break;
		}
		
	}
	
	/**
	 * This method will read HowToUse.txt file and set all document from that file to your input textArea
	 * @param textArea
	 */
	public void showHowToUse(JTextArea textArea)
	{
		switch (language)
		{
			case 0:{textArea.setText(da.readFile(getClass().getResourceAsStream("/Data/HowToUse.txt")));}break;
			case 1:{textArea.setText(da.readFileUTF8(getClass().getResourceAsStream("/Data/HowToUse_VI.txt")));}break;
		}
		
	}
}
